import request from '@/utils/request'

export function createBanner(data) {
  return request({
    url: 'banner',
    method: 'post',
    data
  })
}

export function deleteBanner(id) {
  return request({
    url: `banner/${id}`,
    method: 'delete'
    // params: { pv }
  })
}

export function patchBanner(data) {
  return request({
    url: '/vue-element-admin/article/update',
    method: 'patch',
    data
  })
}

export function fetchBanner(id) {
  return request({
    url: `banner/${id}`,
    method: 'get'
    // params: { id }
  })
}

export function fetchList(query) {
  return request({
    url: 'banner',
    method: 'get',
    params: query
  })
}
